// pages/choice/choice.js
var upload = ''
var app = getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    choiceType:''
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    upload = getCurrentPages()[2]
    
  },
  onUnload: function () {
    upload.choiceDatas()
  },
  back:function(e){
    console.log(e.currentTarget.dataset.type)
    this.setData({
      choiceType:e.currentTarget.dataset.type
    })
    app.goBack()
    wx.setStorageSync('choiceType', this.data.choiceType)
    // wx.redirectTo({ url: '/pages/nameAuthentication/nameAuthentication?choiceType=' + e.currentTarget.dataset.type})
  }
})